<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::segmentation::IntelligentScissorsMB Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d9/d72/namespacecv_1_1segmentation.html">segmentation</a></li><li class="navelem"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="../../d3/d1b/classcv_1_1segmentation_1_1IntelligentScissorsMB-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::segmentation::IntelligentScissorsMB Class Reference<div class="ingroups"><a class="el" href="../../d7/dbd/group__imgproc.html">Image Processing</a> » <a class="el" href="../../d3/d47/group__imgproc__segmentation.html">Image Segmentation</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>Intelligent Scissors image segmentation.  
 <a href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#details">More...</a></p>
<p><code>#include &lt;opencv2/imgproc/segmentation.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aed1e7e68cfd9e42addcb923c4a1d03c1"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#aed1e7e68cfd9e42addcb923c4a1d03c1">IntelligentScissorsMB</a> ()</td></tr>
<tr class="separator:aed1e7e68cfd9e42addcb923c4a1d03c1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2112eaf3230cff8d340aa5e70a51836c"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a2112eaf3230cff8d340aa5e70a51836c">applyImage</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image)</td></tr>
<tr class="memdesc:a2112eaf3230cff8d340aa5e70a51836c"><td class="mdescLeft"> </td><td class="mdescRight">Specify input image and extract image features.  <a href="#a2112eaf3230cff8d340aa5e70a51836c">More...</a><br/></td></tr>
<tr class="separator:a2112eaf3230cff8d340aa5e70a51836c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f218fb1e00fe352c9dd7e9a93b946c8"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a4f218fb1e00fe352c9dd7e9a93b946c8">applyImageFeatures</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> non_edge, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> gradient_direction, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> gradient_magnitude, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="memdesc:a4f218fb1e00fe352c9dd7e9a93b946c8"><td class="mdescLeft"> </td><td class="mdescRight">Specify custom features of imput image.  <a href="#a4f218fb1e00fe352c9dd7e9a93b946c8">More...</a><br/></td></tr>
<tr class="separator:a4f218fb1e00fe352c9dd7e9a93b946c8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0b17c167833efff803121eca3ca30f56"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a0b17c167833efff803121eca3ca30f56">buildMap</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> &amp;sourcePt)</td></tr>
<tr class="memdesc:a0b17c167833efff803121eca3ca30f56"><td class="mdescLeft"> </td><td class="mdescRight">Prepares a map of optimal paths for the given source point on the image.  <a href="#a0b17c167833efff803121eca3ca30f56">More...</a><br/></td></tr>
<tr class="separator:a0b17c167833efff803121eca3ca30f56"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1edf6cc2f3d687a43dba71c66e583f2b"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a1edf6cc2f3d687a43dba71c66e583f2b">getContour</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> &amp;targetPt, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> contour, bool backward=false) const</td></tr>
<tr class="memdesc:a1edf6cc2f3d687a43dba71c66e583f2b"><td class="mdescLeft"> </td><td class="mdescRight">Extracts optimal contour for the given target point on the image.  <a href="#a1edf6cc2f3d687a43dba71c66e583f2b">More...</a><br/></td></tr>
<tr class="separator:a1edf6cc2f3d687a43dba71c66e583f2b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a672c77f2e77fb04c96f7d2abc1e61062"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a672c77f2e77fb04c96f7d2abc1e61062">setEdgeFeatureCannyParameters</a> (double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false)</td></tr>
<tr class="memdesc:a672c77f2e77fb04c96f7d2abc1e61062"><td class="mdescLeft"> </td><td class="mdescRight">Switch edge feature extractor to use Canny edge detector.  <a href="#a672c77f2e77fb04c96f7d2abc1e61062">More...</a><br/></td></tr>
<tr class="separator:a672c77f2e77fb04c96f7d2abc1e61062"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a68213f5d9afdef37e355e84f0f8d8a92"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a68213f5d9afdef37e355e84f0f8d8a92">setEdgeFeatureZeroCrossingParameters</a> (float gradient_magnitude_min_value=0.0f)</td></tr>
<tr class="memdesc:a68213f5d9afdef37e355e84f0f8d8a92"><td class="mdescLeft"> </td><td class="mdescRight">Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters.  <a href="#a68213f5d9afdef37e355e84f0f8d8a92">More...</a><br/></td></tr>
<tr class="separator:a68213f5d9afdef37e355e84f0f8d8a92"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab310bd31e094b0e000858cc756eecf70"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#ab310bd31e094b0e000858cc756eecf70">setGradientMagnitudeMaxLimit</a> (float gradient_magnitude_threshold_max=0.0f)</td></tr>
<tr class="memdesc:ab310bd31e094b0e000858cc756eecf70"><td class="mdescLeft"> </td><td class="mdescRight">Specify gradient magnitude max value threshold.  <a href="#ab310bd31e094b0e000858cc756eecf70">More...</a><br/></td></tr>
<tr class="separator:ab310bd31e094b0e000858cc756eecf70"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adfd6b366c44294f2d62958dab0f2d6e7"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#adfd6b366c44294f2d62958dab0f2d6e7">setWeights</a> (float weight_non_edge, float weight_gradient_direction, float weight_gradient_magnitude)</td></tr>
<tr class="memdesc:adfd6b366c44294f2d62958dab0f2d6e7"><td class="mdescLeft"> </td><td class="mdescRight">Specify weights of feature functions.  <a href="#adfd6b366c44294f2d62958dab0f2d6e7">More...</a><br/></td></tr>
<tr class="separator:adfd6b366c44294f2d62958dab0f2d6e7"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Intelligent Scissors image segmentation. </p>
<p>This class is used to find the path (contour) between two points which can be used for image segmentation.</p>
<p>Usage example: </p><div class="fragment"><div class="line">    segmentation::IntelligentScissorsMB tool;</div><div class="line">    tool.setEdgeFeatureCannyParameters(16, 100)  <span class="comment">// using Canny() as edge feature extractor</span></div><div class="line">        .setGradientMagnitudeMaxLimit(200);</div><div class="line"></div><div class="line">    <span class="comment">// calculate image features</span></div><div class="line">    tool.applyImage(image);</div><div class="line"></div><div class="line">    <span class="comment">// calculate map for specified source point</span></div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> source_point(200, 100);</div><div class="line">    tool.buildMap(source_point);</div><div class="line"></div><div class="line">    <span class="comment">// fast fetching of contours</span></div><div class="line">    <span class="comment">// for specified target point and the pre-calculated map (stored internally)</span></div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> target_point(400, 300);</div><div class="line">    std::vector&lt;Point&gt; pts;</div><div class="line">    tool.getContour(target_point, pts);</div></div><!-- fragment --><p> Reference: <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.138.3811&amp;rep=rep1&amp;type=pdf">"Intelligent Scissors for Image Composition"</a> algorithm designed by Eric N. Mortensen and William A. Barrett, Brigham Young University <a class="el" href="../../d0/de3/citelist.html#CITEREF_Mortensen95intelligentscissors">[179]</a> </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aed1e7e68cfd9e42addcb923c4a1d03c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed1e7e68cfd9e42addcb923c4a1d03c1">◆ </a></span>IntelligentScissorsMB()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::segmentation::IntelligentScissorsMB::IntelligentScissorsMB </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;segmentation_IntelligentScissorsMB object&gt;</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2112eaf3230cff8d340aa5e70a51836c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2112eaf3230cff8d340aa5e70a51836c">◆ </a></span>applyImage()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a>&amp; cv::segmentation::IntelligentScissorsMB::applyImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.applyImage(</td><td class="paramname">image</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Specify input image and extract image features. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>input image. Type is <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a> / <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a> </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a4f218fb1e00fe352c9dd7e9a93b946c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f218fb1e00fe352c9dd7e9a93b946c8">◆ </a></span>applyImageFeatures()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a>&amp; cv::segmentation::IntelligentScissorsMB::applyImageFeatures </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>non_edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>gradient_direction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>gradient_magnitude</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.applyImageFeatures(</td><td class="paramname">non_edge, gradient_direction, gradient_magnitude[, image]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Specify custom features of imput image. </p>
<p>Customized advanced variant of <a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a2112eaf3230cff8d340aa5e70a51836c" title="Specify input image and extract image features. ">applyImage()</a> call.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">non_edge</td><td>Specify cost of non-edge pixels. Type is CV_8UC1. Expected values are <code>{0, 1}</code>. </td></tr>
    <tr><td class="paramname">gradient_direction</td><td>Specify gradient direction feature. Type is CV_32FC2. Values are expected to be normalized: <code>x^2 + y^2 == 1</code> </td></tr>
    <tr><td class="paramname">gradient_magnitude</td><td>Specify cost of gradient magnitude function: Type is CV_32FC1. Values should be in range <code>[0, 1]</code>. </td></tr>
    <tr><td class="paramname">image</td><td><b>Optional parameter</b>. Must be specified if subset of features is specified (non-specified features are calculated internally) </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a0b17c167833efff803121eca3ca30f56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b17c167833efff803121eca3ca30f56">◆ </a></span>buildMap()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::segmentation::IntelligentScissorsMB::buildMap </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> &amp; </td>
          <td class="paramname"><em>sourcePt</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.buildMap(</td><td class="paramname">sourcePt</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Prepares a map of optimal paths for the given source point on the image. </p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a2112eaf3230cff8d340aa5e70a51836c" title="Specify input image and extract image features. ">applyImage()</a> / <a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a4f218fb1e00fe352c9dd7e9a93b946c8" title="Specify custom features of imput image. ">applyImageFeatures()</a> must be called before this call</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sourcePt</td><td>The source point used to find the paths </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a1edf6cc2f3d687a43dba71c66e583f2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1edf6cc2f3d687a43dba71c66e583f2b">◆ </a></span>getContour()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::segmentation::IntelligentScissorsMB::getContour </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> &amp; </td>
          <td class="paramname"><em>targetPt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>contour</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>backward</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>contour</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.getContour(</td><td class="paramname">targetPt[, contour[, backward]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Extracts optimal contour for the given target point on the image. </p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a0b17c167833efff803121eca3ca30f56" title="Prepares a map of optimal paths for the given source point on the image. ">buildMap()</a> must be called before this call</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">targetPt</td><td>The target point </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">contour</td><td>The list of pixels which contains optimal path between the source and the target points of the image. Type is CV_32SC2 (compatible with <code>std::vector&lt;Point&gt;</code>) </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">backward</td><td>Flag to indicate reverse order of retrived pixels (use "true" value to fetch points from the target to the source point) </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a672c77f2e77fb04c96f7d2abc1e61062"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a672c77f2e77fb04c96f7d2abc1e61062">◆ </a></span>setEdgeFeatureCannyParameters()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a>&amp; cv::segmentation::IntelligentScissorsMB::setEdgeFeatureCannyParameters </td>
          <td>(</td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>threshold1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>threshold2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>apertureSize</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>L2gradient</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.setEdgeFeatureCannyParameters(</td><td class="paramname">threshold1, threshold2[, apertureSize[, L2gradient]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Switch edge feature extractor to use Canny edge detector. </p>
<dl class="section note"><dt>Note</dt><dd>"Laplacian Zero-Crossing" feature extractor is used by default (following to original article)</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dd/d1a/group__imgproc__feature.html#ga04723e007ed888ddf11d9ba04e2232de" title="Finds edges in an image using the Canny algorithm  . ">Canny</a> </dd></dl>
</div>
</div>
<a id="a68213f5d9afdef37e355e84f0f8d8a92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68213f5d9afdef37e355e84f0f8d8a92">◆ </a></span>setEdgeFeatureZeroCrossingParameters()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a>&amp; cv::segmentation::IntelligentScissorsMB::setEdgeFeatureZeroCrossingParameters </td>
          <td>(</td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>gradient_magnitude_min_value</em> = <code>0.0f</code></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.setEdgeFeatureZeroCrossingParameters(</td><td class="paramname">[, gradient_magnitude_min_value]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Switch to "Laplacian Zero-Crossing" edge feature extractor and specify its parameters. </p>
<p>This feature extractor is used by default according to article.</p>
<p>Implementation has additional filtering for regions with low-amplitude noise. This filtering is enabled through parameter of minimal gradient amplitude (use some small value 4, 8, 16).</p>
<dl class="section note"><dt>Note</dt><dd>Current implementation of this feature extractor is based on processing of grayscale images (color image is converted to grayscale image first).</dd>
<dd>
Canny edge detector is a bit slower, but provides better results (especially on color images): use <a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html#a672c77f2e77fb04c96f7d2abc1e61062" title="Switch edge feature extractor to use Canny edge detector. ">setEdgeFeatureCannyParameters()</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gradient_magnitude_min_value</td><td>Minimal gradient magnitude value for edge pixels (default: 0, check is disabled) </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ab310bd31e094b0e000858cc756eecf70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab310bd31e094b0e000858cc756eecf70">◆ </a></span>setGradientMagnitudeMaxLimit()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a>&amp; cv::segmentation::IntelligentScissorsMB::setGradientMagnitudeMaxLimit </td>
          <td>(</td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>gradient_magnitude_threshold_max</em> = <code>0.0f</code></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.setGradientMagnitudeMaxLimit(</td><td class="paramname">[, gradient_magnitude_threshold_max]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Specify gradient magnitude max value threshold. </p>
<p>Zero limit value is used to disable gradient magnitude thresholding (default behavior, as described in original article). Otherwize pixels with <code>gradient magnitude &gt;= threshold</code> have zero cost.</p>
<dl class="section note"><dt>Note</dt><dd>Thresholding should be used for images with irregular regions (to avoid stuck on parameters from high-contract areas, like embedded logos).</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gradient_magnitude_threshold_max</td><td>Specify gradient magnitude max value threshold (default: 0, disabled) </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="adfd6b366c44294f2d62958dab0f2d6e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adfd6b366c44294f2d62958dab0f2d6e7">◆ </a></span>setWeights()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d6b/classcv_1_1segmentation_1_1IntelligentScissorsMB.html">IntelligentScissorsMB</a>&amp; cv::segmentation::IntelligentScissorsMB::setWeights </td>
          <td>(</td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>weight_non_edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>weight_gradient_direction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>weight_gradient_magnitude</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.segmentation_IntelligentScissorsMB.setWeights(</td><td class="paramname">weight_non_edge, weight_gradient_direction, weight_gradient_magnitude</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Specify weights of feature functions. </p>
<p>Consider keeping weights normalized (sum of weights equals to 1.0) Discrete dynamic programming (DP) goal is minimization of costs between pixels.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">weight_non_edge</td><td>Specify cost of non-edge pixels (default: 0.43f) </td></tr>
    <tr><td class="paramname">weight_gradient_direction</td><td>Specify cost of gradient direction function (default: 0.43f) </td></tr>
    <tr><td class="paramname">weight_gradient_magnitude</td><td>Specify cost of gradient magnitude function (default: 0.14f) </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/imgproc/<a class="el" href="../../d0/d0b/modules_2imgproc_2include_2opencv2_2imgproc_2segmentation_8hpp.html">segmentation.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:48 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
